package com.jingdianjichi.subject.common.enums;

import lombok.Getter;

@Getter
public enum SubjectTypeEnums {
    RADIO(1, "单选"),
    MULTIPLE(2, "多选"),
    JUDGE(3,"判断"),
    BIREF(4,"简单");

    private int code;
    private String desc;

    SubjectTypeEnums(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public static SubjectTypeEnums getResultEnumCode(int code) {
        for (SubjectTypeEnums result : SubjectTypeEnums.values()) {
            if (result.code == code) {
                return result;
            }

        }
        return null;
    }
}